<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>
         <h:form>
             <h:outputText value="Search"/>
             <h:inputText value="#{testBean.search}">
                 <f:ajax event="keyup" render="result"/> 
      </h:inputText>
             <h:commandButton action="search" value="No AJAX"/>
             <h:commandButton value="AJAX" > 
                <f:ajax execute="@form" render="result"/> 
             </h:commandButton>
             <h:dataTable value="#{testBean.users}" var="t" id="result">
                    <h:column>
    			<f:facet name="header">
    				Id
			</f:facet>
    			#{t.id}
    		</h:column>
                <h:column>
    			<f:facet name="header">
    				Username
			</f:facet>
                    <h:link value="#{t.username}" outcome="userPage">
                        <f:param name="userid" value="#{t.id}"/>
                    </h:link>
    		</h:column>
                 <h:column>
    			<f:facet name="header">
    				commandLinks
			</f:facet>
                     <h:commandLink action="userPage" value="#{t.username}">
                         <f:setPropertyActionListener target="#{displayUserBean.id}" value="#{t.id}"/>
                     </h:commandLink>
    		</h:column>
                 <h:column>
                     <f:facet name ="header">Action</f:facet>
                     <h:commandButton action="userPage" value="#{t.username}">
                        <f:setPropertyActionListener target="#{displayUserBean.id}" value="#{t.id}" />
                    </h:commandButton>
                 </h:column>
                <h:column>
    			<f:facet name="header">
    				Password
			</f:facet>
    			#{t.password}
    		</h:column>
                <h:column>
    			<f:facet name="header">
    				Salt
			</f:facet>
    			#{t.salt}
    		</h:column>    
                <h:column>
    			<f:facet name="header">
    				Address
			</f:facet>
    			#{t.address}
    		</h:column>
                <h:column>
    			<f:facet name="header">
    				Zipcode
			</f:facet>
    			#{t.zipcode}
    		</h:column>
                <h:column>
    			<f:facet name="header">
    				City
			</f:facet>
    			#{t.city}
    		</h:column>
                <h:column>
    			<f:facet name="header">
    				Country
			</f:facet>
    			#{t.country}
    		</h:column>
                </h:dataTable>
         </h:form>
    </h:body>
</html>

